package com.totoro.test;

public class OutClass {
    private class InnerClass implements Runnable{

        @Override
        public void run() {
            System.out.println("inner class run!");
        }
    }

    /**
     * 返回一个静态内部类（闭包）的回调
     * @return
     */
    public Runnable  run(){
        InnerClass innerClass = new InnerClass() ;
        return innerClass ;

    }

    public static void main(String[] args) {
        OutClass out = new OutClass() ;
        Thread thread = new Thread(out.run()) ;
        thread.run();
    }

}
